package cn.kogee.feignclient;

import cn.kogee.domian.Product;
import cn.kogee.domian.Store;
import cn.kogee.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("product-server")
public interface OrdetFeign {
    @PutMapping
    AjaxResult add(@RequestBody Product product);
    @GetMapping("/{id}")
    Product findById(@PathVariable("id") Long id);
    @PutMapping("/up")
    Object upstore(@RequestBody Store store);
    @GetMapping("/sto/{id}")
    Object getSto(@PathVariable("id") Long id);
}
